<template>
  <ul class="service-list">
    <li class="service-list-item service-bj1">
      <div class="service-title">
        <h3>{{ content.name }}</h3>
      </div>
      <div class="service-content">
        <ul class="service-content-list">
          <li>
            <h4>产品描述</h4>
            <p>{{ content.remark }}</p>
          </li>
          <li>
            <h4>负责人</h4>
            <p>{{ content.author }}</p>
          </li>
          <li>
            <h4>参与人</h4>
            <p>TODO</p>
          </li>
        </ul>
        <br>
        <br>
        <br>
        <a href="javascript:;" class="service-list-more" @click="handleViewClick(content.id)">查看详情</a>
      </div>
    </li>
  </ul>
</template>

<script>
export default {
  props: {
    content: {
      type: Object,
      default: () => {}
    }
  },
  methods: {
    handleViewClick(id) {
      // 这里不要删除缓存了
      // this.$store.dispatch('tagsView/delView', { name: 'AutoCaseDemand', path: '/auto/auto-case-demand' })
      this.$nextTick(() => {
        this.$router.push({
          name: 'AutoCaseDemand',
          params: {
            productId: id
          }
        })
      })
    }
  }
}
</script>

<style scoped>
  h3,
  h4,
  p,
  ul,
  li {
    margin: 0;
    padding: 0;
  }

  a {
    text-decoration: none;
    color: #666;
  }

  a:hover {
    color: #eee;
  }

  /* 必要布局样式css */
  .service-list .service-list-item {
    float: left;
    width: 290px;
    margin-right: 13px;
    background: #fff;
    -webkit-transition: all .2s;
    -moz-transition: all .2s;
    transition: all .2s;
    border: 1px solid #E7E9EC;
    overflow: hidden;
  }

  .service-title {
    width: 290px;
    height: 160px;
  }

  .service-bj1 .service-title {
    background: url(../../assets/img/service-001.jpg) no-repeat center top;
  }

  .service-bj2 .service-title {
    background: url(../../assets/img/service-002.jpg) no-repeat center top;
  }

  .service-bj3 .service-title {
    background: url(../../assets/img/service-003.jpg) no-repeat center top;
  }

  .service-bj4 .service-title {
    background: url(../../assets/img/service-004.jpg) no-repeat center top;
  }

  .service-title h3 {
    font-size: 24px;
    text-align: center;
    padding-top: 105px;
    color: #fff;
    font-weight: normal;
  }

  .service-content {
    height: 318px;
    border-top: 0;
  }

  .service-content-list {
    margin-left: 58px;
    margin-top: 28px;
  }

  .service-content-list li {
    margin-bottom: 18px;
    position: relative;
  }

  .service-content-list li:before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #C1C5CB;
    content: "";
    position: absolute;
    left: -16px;
    top: 7px;
  }

  .service-content-list li h4 {
    font-size: 14px;
    color: #616366;
    font-weight: 700;
    margin-bottom: 3px;
    line-height: 20px;
  }

  .service-content-list li p {
    font-size: 14px;
    color: #919499;
  }

  .service-list-more {
    width: 200px;
    height: 40px;
    display: block;
    margin: 0 auto;
    color: #eb6709;
    text-align: center;
    line-height: 40px;
    font-size: 16px;
    border: 1px solid #eb6709;
    transition: all .2s;
  }

  .service-list-more:hover {
    background: #eb6709;
    color: #fff;
  }

  .service-list .service-list-item:hover {
    -webkit-box-shadow: 0 10px 6px -6px #777;
    -moz-box-shadow: 0 10px 6px -6px #777;
    box-shadow: 0 10px 6px -6px #777;
  }
</style>
